package com.xiangdao.service;

import com.xiangdao.dao.PostMainDao;
import com.xiangdao.model.PostMain;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class PostMainService {
    @Autowired
    PostMainDao postMainDao;


    public int addPostMain(PostMain postMain){
        return postMainDao.addPostMain(postMain);
    }

    public void deletePostMainById(Integer id){
        postMainDao.deletePostMainById(id);
    }

    public ArrayList<PostMain> findAllPostMain(){
        return postMainDao.findAllPostMain();
    }

}
